package jmine.tec.rpc.server.representation.representers;

import jmine.tec.rpc.server.representation.Representer;

/**
 * Classe abstrata base para implementações de Representer
 * 
 * @author lundberg
 * @param <R> tipo de representação
 * @param <E> tipo de entidade representada
 */
public abstract class AbstractRepresenter<R, E> implements Representer<R, E> {

    private final Class<? extends R> representationClass;

    private final Class<? extends E> representedClass;

    /**
     * Construtor
     * 
     * @param representationClass representationClass
     * @param representedClass representedClass
     */
    public AbstractRepresenter(Class<? extends R> representationClass, Class<? extends E> representedClass) {
        this.representationClass = representationClass;
        this.representedClass = representedClass;
    }

    /**
     * {@inheritDoc}
     */
    public final Class<? extends R> getRepresentationClass() {
        return this.representationClass;
    }

    /**
     * {@inheritDoc}
     */
    public final Class<? extends E> getRepresentedClass() {
        return this.representedClass;
    }
}
